from uiMarkItem import *
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *


class MarkItem(QWidget, Ui_MarkItem):
	deleteClicked = pyqtSignal()
	
	def __init__(self, parent=None):
		super(MarkItem, self).__init__(parent)
		self.setupUi(self)
		self.pb_delete.clicked.connect(self.deleteClicked.emit)
	
	def getDescribe(self):
		return self.le_desc.text()
	
	def getDateTime(self):
		return self.dte.dateTime()
	
	def setBackgroundColor(self, r, g, b):
		qss = "QWidget{background-color:rgb(" + str(r) + "," + str(g) + "," + str(b) + ");}"
		self.setStyleSheet(qss)
